List instances and List revision should use ST Id not name#9643
List instances and List revision should use ST Id not name#9643Avisiktapatra wants to merge 42 commits intoAzure:mainfrom
Conversation
❌Azure CLI Extensions Breaking Change Test
|
|
Hi @Avisiktapatra, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
There was a problem hiding this comment.
Pull request overview
This PR updates workload-orchestration target listing commands to use the solution template’s uniqueIdentifier (ST Id) instead of the template name when calling the target “solutions” list endpoints, to align with the service’s expected identifier.
Changes:
- Add a shared
TargetHelper.get_solution_template_unique_identifier(...)to fetch a solution template and extractproperties.uniqueIdentifier. - Update
target solution-instance-listto resolve and useuniqueIdentifierfor thesolutionNamepath segment. - Update
target solution-revision-listto resolve and useuniqueIdentifierfor thesolutionNamepath segment.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/target/_target_helper.py |
New helper for resolving solution template uniqueIdentifier via a GET on solutionTemplates. |
src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/target/_solution_instance_list.py |
Uses resolved uniqueIdentifier in URL params for listing solution instances. |
src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/target/_solution_revision_list.py |
Uses resolved uniqueIdentifier in URL params for listing solution revisions. |
...tion/azext_workload_orchestration/aaz/latest/workload_orchestration/target/_target_helper.py
Outdated
Show resolved
Hide resolved
...tion/azext_workload_orchestration/aaz/latest/workload_orchestration/target/_target_helper.py
Show resolved
Hide resolved
| def __call__(self, *args, **kwargs): | ||
| # Resolve solution template name to its uniqueIdentifier | ||
| self.unique_identifier = TargetHelper.get_solution_template_unique_identifier( | ||
| self.ctx.subscription_id, | ||
| self.ctx.args.resource_group, | ||
| self.ctx.args.solution_name, | ||
| self.client | ||
| ) | ||
|
|
||
| request = self.make_request() |
There was a problem hiding this comment.
The new behavior adds an extra management-plane GET to resolve the solution template uniqueIdentifier before listing instances, but there’s no scenario coverage for this command path in the extension tests. Adding/adjusting a scenario test to exercise workload-orchestration target solution-instance-list (including the extra solutionTemplates GET) would help prevent regressions.
...t_workload_orchestration/aaz/latest/workload_orchestration/target/_solution_revision_list.py
Show resolved
Hide resolved
…test/workload_orchestration/target/_target_helper.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…test/workload_orchestration/target/_target_helper.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
...t_workload_orchestration/aaz/latest/workload_orchestration/target/_solution_instance_list.py
Outdated
Show resolved
Hide resolved
...t_workload_orchestration/aaz/latest/workload_orchestration/target/_solution_revision_list.py
Outdated
Show resolved
Hide resolved
Adds a new CLI command for collecting diagnostic data from K8s clusters running the WO extension. Produces a zip bundle with: - 18 prerequisite health checks (K8s version, nodes, DNS, storage, cert-manager, webhooks, PSA, quotas, CSI, proxy, RBAC) - Container logs (tailed, parallel collection, + previous logs) - Resource descriptions (pods, deployments, services, events, etc.) - WO component status (Symphony, ClusterIssuers, Gatekeeper) - Node/pod metrics (kubectl top equivalent) All operations are read-only. Bundle is always generated even if individual collection steps fail. 136 unit + integration tests. Tested on AKS (BVT-Test-Cluster) and minikube (vanilla cluster). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add container state details (exit codes, restart reasons, last terminated) - Add node taints and detailed conditions (reason + message) - Add StatefulSet collection to namespace resources - Improve RBAC 403 errors with remediation guidance - Improve 401 errors with credential refresh guidance - Add disk space pre-flight check before collection - Better capability detection fallback (returns all-false, not empty dict) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rce collectors, health summary - Add retry with exponential backoff (3 retries, 1/2/4s) to safe_api_call - Add per-API-call timeout (30s default) via _request_timeout injection - Add thread-level timeout for container log collection (60s default) - Add pre-flight namespace existence validation (skip non-existent/terminating) - Add ReplicaSet, Job, CronJob, Ingress, NetworkPolicy, ServiceAccount collectors - Add _get_owner_ref helper for ReplicaSet owner tracking - Add overall health summary (HEALTHY/DEGRADED/CRITICAL/UNKNOWN) to metadata - Add health score computation (0-100) based on check results - Show health status in final output summary - Add 34 new unit tests (170 total, all passing) - Add root-level conftest.py for pytest mock setup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add support bundle feature description to HISTORY.rst v5.0.0 - Simplify inner tests/conftest.py to only handle sys.path setup - Root conftest.py handles all azure.cli mock module setup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move support bundle modules into azext_workload_orchestration/support/ package: _support_consts.py → support/consts.py _support_utils.py → support/utils.py _support_collectors.py → support/collectors.py _support_validators.py → support/validators.py (new) bundle.py — orchestration logic extracted from custom.py (new) __init__.py — public API: create_support_bundle() (new) README.md — architecture docs, how to add checks/collectors custom.py now re-exports create_support_bundle from the support package. Adding a new check = write one function + add one line to the checks list. Adding a new collector = add one code block to collect_namespace_resources(). All 170 tests pass. E2E verified on live AKS cluster (18/18 checks PASS). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…r-wide events - Add _check_arc_dependencies: validates azure-arc and azure-extensions namespaces exist with healthy pods (prerequisite for WO extension) - Add _check_wo_services_deployments: verifies WO deployments have all replicas ready and services are present - Add collect_all_events: collects events from ALL namespaces into cluster-info/events.json (warnings prioritized, capped at 500) - Total checks: 20 (was 18) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…aswita-chichili/azure-cli-extensions into avpatra/RevisionInstancesFix
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@microsoft-github-policy-service agree company="Microsoft" |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Add new command for capability updates on ST
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Merge audapure/wo-support-bundle into avpatra/RevisionInstancesFix. Adds az workload-orchestration support create-bundle command. Version kept at 5.1.1, support bundle entry added to HISTORY.rst. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix unused imports (STATUS_*, FOLDER_LOGS, format_bytes, SC_DEFAULT_*) - Fix unused variables (err -> _err, log_err -> _log_err, contexts, total, used) - Fix broad-exception-caught with inline pylint disable - Fix too-many-return-statements with inline pylint disable - Fix line-too-long in collectors.py and bundle.py - Fix unused-import in custom.py with pylint disable comment - Refactor parse_memory_gi to use dict-based suffix lookup - Refactor check_disk_space to use named tuple access Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove unused imports (DEFAULT_TIMEOUT_SECONDS, FOLDER_CHECKS, DNS_INTERNAL_HOST) - Fix unused variables with underscore prefix (_ctx_name, _status, _err) - Fix E127 continuation line indentation in bundle.py, collectors.py - Fix line-too-long violations in validators.py - Fix E226 missing whitespace around arithmetic operator - Add pylint disable for unused-argument in validators (standard signatures) - Add pylint disable for broad-exception-caught in diagnostic code - Extract _append_namespace_resources and _append_wo_components helpers to fix too-many-branches and too-many-nested-blocks in bundle.py - Remove duplicate json import (W0404) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add comprehensive pylint disables for utils.py (broad-exception, too-many-args) - Add comprehensive pylint disables for bundle.py (all structural warnings) - Add too-many-locals disable for validators.py - Add too-many-lines,branches,statements,locals,args disables for collectors.py - Fix _contexts unused variable in utils.py - Fix disk_usage to use named tuple access - All previous fixes were uncommitted - pushing now Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |






This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.